home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / SubdivSurfacesMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  8.7 KB  |  280 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2001 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //  Alias|Wavefront Script File
  35. //  MODIFY THIS AT YOUR OWN RISK
  36. //
  37. //  Creation Date:  Nov 11, 1998
  38. //
  39. //
  40. //
  41. //  Description:
  42. //      This implements the "Subdiv Surface" menu on the modeling menubar.
  43. //
  44.  
  45.  
  46. //////////////////////////////////////////////////////////////////////
  47. global proc string SubdivSurfacesMenuItemToShelf (string $item)
  48. {
  49.     return $item;
  50. }
  51.  
  52. global proc SubdivSurfacesMenu(string $parent)
  53. //
  54. // Description:
  55. //        Subdiv Surfaces menu
  56. //
  57. {
  58.  
  59.     if (! `isTrue "SubdivUIExists"`) return;
  60.  
  61.     setParent -m $parent;
  62.  
  63.     if (`menu -q -ni $parent` == 0) {
  64.  
  65.         // Texture
  66.         //
  67.         string $textItem=`menuItem -l "Texture" -sm 1 -to 1 -aob true subdTexturesItem`;
  68.         SubdTextureMenu $textItem 0 "ls -sl";
  69.         setParent -m ..;
  70.         
  71.         menuItem -divider true;
  72.  
  73.         // Crease mesh edge or mesh point
  74.         //
  75.         menuItem -l "Full Crease Edge/Vertex" -ecr true 
  76.             -ann "Full Crease Subdivision Surface Edge or Vertex (tangent break)"
  77.             -image subdivCrease.xpm
  78.             -echoCommand true
  79.             -c "FullCreaseSubdivSurface"
  80.             subdivCreaseItem;
  81.         
  82.         menuItem -l "Partial Crease Edge/Vertex" -ecr true 
  83.             -ann "Partial Crease Subdivision Surface Edge or Vertex (no tangent break)"
  84.             -image subdivPartialCrease.xpm
  85.             -echoCommand true
  86.             -c "PartialCreaseSubdivSurface"
  87.             subdivCreaseSimpleItem;
  88.         
  89.         // UnCrease mesh edge or mesh point
  90.         //
  91.         menuItem -l "Uncrease Edge/Vertex" -ecr true 
  92.             -ann "Uncrease Subdivision Surface Edge or Vertex"
  93.             -image subdivUncrease.xpm
  94.             -echoCommand true
  95.             -c "UncreaseSubdivSurface"
  96.             subdivUnCreaseItem;
  97.         menuItem -divider true;
  98.         
  99.        menuItem -l "Mirror" -ecr true 
  100.          -ann ("Mirror subdivision surface geometry")
  101.         -image subdivMirror.xpm
  102.          -c "MirrorSubdivSurface"
  103.          subdivMirrorItem;
  104.        menuItem -optionBox 1 
  105.         // need to add -i option
  106.          -annotation "Mirror Subdiv Surface Option Box" 
  107.         -image subdivMirror.xpm
  108.          -l "Mirror Subdiv Surface Option Box" -ecr false 
  109.          -c "MirrorSubdivSurfaceOptions" 
  110.         subdivMirrorOptionItem;
  111.  
  112.        menuItem -l "Attach" -ecr true 
  113.          -ann ("Attach two subdivision surfaces into a new one ")
  114.         -image subdivAttach.xpm
  115.          -c "AttachSubdivSurface"
  116.          subdivAttachItem;
  117.        menuItem -optionBox 1 
  118.         // need to add -i option
  119.          -annotation "Attach Subdiv Surface Option Box" 
  120.          -l "Attach Subdiv Surface Option Box" -ecr false 
  121.         -image subdivAttach.xpm
  122.          -c "AttachSubdivSurfaceOptions" 
  123.         subdivAttachOptionItem;
  124.  
  125.         menuItem -divider true;
  126.       
  127.         menuItem -l "Match Topology"
  128.             -ecr true
  129.             -ann "Match topology (at all levels) of selected subdivision surfaces."
  130.             -image subdivMatchToplogy.xpm
  131.             -c "SubdivSurfaceMatchTopology"
  132.             subdivMatchTopoItem;
  133.  
  134.         menuItem -l "Clean Topology"
  135.             -ecr true
  136.             -ann "Remove unnecessary finer level vertices from selected subdivision surfaces."
  137.             -image subdivCleanToplogy.xpm
  138.             -c "SubdivSurfaceCleanTopology"
  139.             subdivCleanTopoItem;
  140.  
  141.         menuItem -divider true;
  142.  
  143.        menuItem -l "Collapse Hierarchy" -ecr true 
  144.          -ann ("Remove a number of low levels of the " +
  145.               "subdivision surface hieararchy")
  146.         -image subdivCollapseHierearchy.xpm
  147.          -c "CollapseSubdivSurfaceHierarchy"
  148.          subdivCollapseItem;
  149.        menuItem -optionBox 1 
  150.         // need to add -i option
  151.          -annotation "Collapse Hierarchy Option Box" 
  152.          -l "Collapse Hierarchy Option Box" -ecr false 
  153.         -image subdivCollapseHierearchy.xpm
  154.          -c "CollapseSubdivSurfaceHierarchyOptions" 
  155.         subdivCollapseOptionItem;
  156.  
  157.         menuItem -divider true;
  158.  
  159.         menuItem -l "Standard Mode"
  160.             -ecr true
  161.             -ann "Put the subdivision surface into the standard editing mode."
  162.             -image subdivStandardMode.xpm
  163.             -c "SubdivSurfaceHierarchyMode"
  164.             subdivHierItem;
  165.  
  166.         menuItem -l "Polygon Proxy Mode"
  167.             -ecr true
  168.             -ann "Put the subdivision surface into the polygon proxy mode."
  169.             -image subdivPolyMode.xpm
  170.             -c "SubdivSurfacePolygonProxyMode"
  171.             subdivPolyItem;
  172.  
  173.         menuItem -divider true;
  174.       
  175.         // Subdiv Convert Selection  - use PolySelectConvert because
  176.         // it does both poly and subd conversion
  177.         //
  178.         menuItem -l "Convert Selection to Faces" -ecr false 
  179.             -c ("PolySelectConvert 1")
  180.             -echoCommand true
  181.             -ann "Convert Selection to subdivision surface faces" 
  182.             -image "polyConvertToFace.xpm"
  183.             -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 1\""    
  184.             subdivConvertSelectionFacesItem;
  185.         menuItem -l "Convert Selection to Edges" -ecr false 
  186.             -c ("PolySelectConvert 2")
  187.             -echoCommand true
  188.             -ann "Convert Selection to subdivision surface edges" 
  189.             -image "polyConvertToEdge.xpm"
  190.             -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 2\""    
  191.             subdivConvertSelectionEdgesItem;
  192.         menuItem -l "Convert Selection to Vertices" -ecr false 
  193.             -c ("PolySelectConvert 3")
  194.             -echoCommand true
  195.             -image "polyConvertToVertices.xpm"
  196.             -ann "Convert Selection to subdivision surface vertices" 
  197.             -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 3\""    
  198.             subdivConvertSelectionVertsItem;
  199.         menuItem -l "Convert Selection to UVs" -ecr false 
  200.             -c ("PolySelectConvert 4")
  201.             -echoCommand true
  202.             -ann "Convert Selection to subdivision surface UVs" 
  203.             -image "polyConvertToUVs.xpm"
  204.             -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 4\""    
  205.             subdivConvertSelectionUVsItem;
  206.  
  207.         // Subdiv refine 
  208.         //
  209.         menuItem -l "Refine Selected Components" -ecr true 
  210.             -c ("RefineSelectedComponents")
  211.             -echoCommand true
  212.             -ann "Refine selected subdivision surface components" 
  213.             -image subdivRefineRegion.xpm
  214.             subdivCreateAndRefineRegionItem;
  215.         
  216.         // Subdiv Expand Region
  217.         //
  218.         menuItem -l "Expand Selected Components" -ecr true 
  219.             -c ("ExpandSelectedComponents")
  220.             -echoCommand true
  221.             -ann "Expand selected subdivision surface components" 
  222.             -image subdivExpandRegion.xpm
  223.             subdivExpandRegionItem;
  224.         
  225.         menuItem -divider true;
  226.         
  227.         menuItem -l "Component Display Level" -sm 1 -to 1 -aob true;
  228.  
  229.         // Finer Mesh Display
  230.         //
  231.         menuItem -l "Finer" -ecr true 
  232.             -c "FineLevelComponentDisplay"
  233.             -echoCommand true
  234.             -ann "Finer Level Component Display" 
  235.             -image subdivFineMesh.xpm
  236.             subdivFinerMeshItem;
  237.         
  238.         // Coarser Mesh Display
  239.         //
  240.         menuItem -l "Coarser" -ecr true 
  241.             -c "CoarseLevelComponentDisplay"
  242.             -echoCommand true
  243.             -annotation "Coarser Level Component Display" 
  244.             -image subdivCoarseMesh.xpm
  245.             subdivCoaserMeshItem;
  246.         
  247.         // Base Mesh Display
  248.         //
  249.         menuItem -l "Base" -ecr true 
  250.             -c "BaseLevelComponentDisplay"
  251.             -echoCommand true
  252.             -annotation "Base Level Component Display" 
  253.             -image subdivBaseMesh.xpm
  254.             subdivBaseMeshItem;
  255.         
  256.         setParent -m ..;
  257.  
  258.         menuItem -l "Component Display Filter" -sm 1 -to 1 -aob true;
  259.  
  260.         // Show all at current level
  261.         //
  262.         menuItem -l "All" -ecr true 
  263.             -c "ShowAllComponents"
  264.             -annotation "Show All Components At Current Level"
  265.             -echoCommand true
  266.             subdivShowAllCurrentLevelItem;
  267.  
  268.         // Show editted mesh points at current level
  269.         //
  270.         menuItem -l "Edits" -ecr true 
  271.             -c "ShowAllEditedComponents"
  272.             -annotation "Show All Edited Components At Current Level"
  273.             -echoCommand true
  274.             subdivShowEditsCurrentLevelItem;
  275.         
  276.         setParent -m ..;
  277.     }
  278. }
  279.  
  280.